#include "apue.h"

int main() {
    pid_t pid;
    pid = fork();
    if (pid < 0) {
        err_sys("fork error");
    } else if (pid == 0) {
        printf("I am child process, pid: %d, ppid: %d\n", getpid(), getppid());
    } else {
        printf("I am parent process, pid: %d, child pid: %d\n", getpid(), pid);
    }

    return 0;
}
